#include"ProcessPool.hpp"

void Usage(std::string proc)
{
    std::cout << "Usage: " << proc << " process-num" << std::endl;
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        return UsageError;
    }
    ProcessPool* pp=new ProcessPool(std::stoi(argv[1]),Worker);
    pp->InitProcessPool();
    pp->Dispatcher();
    pp->CleanProcesPool();
    delete pp;
    return 0;
}